package com.ogilvy.audi.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ogilvy.audi.bean.Comment;
import com.ogilvy.audi.service.CommentService;
import com.ogilvy.frame.action.BaseAction;

@SuppressWarnings("serial")
@Scope("prototype")
@Controller("auti.action.CommentAction")
public class CommentAction extends BaseAction {
	@Autowired
	protected CommentService commentService;
	String commentId;

	public String query() {
		return "result";
	}

	public String add() {
		Comment comment = new Comment();
		commentService.add(comment);
		return null;
	}

	public String modify() {
		return null;
	}

	public String del() {
		commentService.del(Integer.parseInt(commentId));
		return null;

	}
}






